package com.jsu.clubmanagementsystem.service.review;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jsu.clubmanagementsystem.model.dto.review.ReviewConsequence;
import com.jsu.clubmanagementsystem.model.dto.review.ReviewQueryRequest;
import com.jsu.clubmanagementsystem.model.entity.ActivityApplication;
import com.jsu.clubmanagementsystem.model.entity.ClubApplication;
import com.jsu.clubmanagementsystem.model.entity.Review;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jsu.clubmanagementsystem.model.entity.UserApplication;
import com.jsu.clubmanagementsystem.model.vo.review.BatchReviewConsequence;
import com.jsu.clubmanagementsystem.model.vo.review.ReviewVO;
import jakarta.servlet.http.HttpServletRequest;

import java.util.List;

/**
* @author 24753
* @description 针对表【review(审核)】的数据库操作Service
* @createDate 2025-05-17 17:05:46
*/
public interface ReviewService extends IService<Review> {

    /**
     * 处理不同申请类型的审核
     *
     * @param reviewConsequence
     * @return
     */
    Long acceptReview(ReviewConsequence reviewConsequence);

    /**
     * 拒绝申请 分流
     *
     * @param reviewConsequence
     * @return
     */
    Long rejectReview(ReviewConsequence reviewConsequence);

    /**
     * 批量处理审核
     *
     * @param reviewConsequences
     * @return
     */
    BatchReviewConsequence processBatchReview(List<ReviewConsequence> reviewConsequences);

    /**
     * 获取审核封装
     *
     * @param review
     * @return
     */
    ReviewVO getReviewVo(Review review);

    /**
     * 获取申请的审核结果
     *
     * @param applicationId
     * @param applicationType
     * @return
     */
    Review getReviewByApplication(Long applicationId, Integer applicationType);

    /**
     * 获取申请的审核封装结果
     * @param applicationId
     * @param applicationType
     * @return
     */
    ReviewVO getReviewVoByApplication(Long applicationId, Integer applicationType);

    /**
     * 获取审核列表
     *
     * @param queryRequest
     * @return
     */
    public Page<ReviewVO> listReviewVoByPage(ReviewQueryRequest queryRequest);

    /**
     * 审核数据是否存在
     *
     * @param reviewId
     * @return
     */
    public boolean isExist(Long reviewId);

    /**
     * 校验审核结果
     *
     * @param review
     */
    public void reviewValidation(Review review);

    /**
     * 审核人身份校验
     *
     * @param consequence
     * @param request
     */
    void reviewerValidation(ReviewConsequence consequence, HttpServletRequest request);
}
